public string GetBaseClassName(Level level, bool isSafe)
{
	return level.IsRoot && isSafe ?FrameworkObject.ObjectName + "Base":GetClassName(Level);
}

public string GetClassName(Level level)
{
	if (level.IsRoot)
	    return FrameworkObject.ObjectName;
		
	return level.Name;
}

public bool IsNullableType(AttributeItem attribute)
{
    return (attribute.IsDate || attribute.IsInteger || attribute.IsNumeric || attribute.DataType == DeklaritType.Boolean || attribute.DataType == DeklaritType.Guid);
}

public string GetKeyParametersDefinition(ArrayList attributeList)
{
	StringBuilder builder = new StringBuilder();
	
	foreach (AttributeItem att in attributeList)
	{
		
		builder.Append(GeneratorHelper.GetDataTypeParameter( att)).Append(" ").Append("_").Append(att.Name).Append(", ");
	}
	
	if	(builder.Length > 2)
		builder.Remove(builder.Length - 2, 2);	
	return builder.ToString();
}

public string GetKeyParametersInvocation(ArrayList attributeList)
{
	StringBuilder builder = new StringBuilder();
	
	foreach (AttributeItem att in attributeList)
	{
		builder.Append("_").Append(att.Name).Append(", ");
	}
	if	(builder.Length > 2)
		builder.Remove(builder.Length - 2, 2);	

	return builder.ToString();
}

public string GetKeyParametersInvocationFromRow(ArrayList attributeList)
{
	StringBuilder builder = new StringBuilder();
	
	foreach (AttributeItem att in attributeList)
	{
		builder.Append("m_ParentRow.").Append(att.Name).Append(", ");
	}

	return builder.ToString();
}

public string GetKeyParametersNames(ArrayList attributeList)
{
	StringBuilder builder = new StringBuilder();
	
	foreach (AttributeItem att in attributeList)
	{
		builder.Append(att.Name);
	}
	
	return builder.ToString();
}